﻿// 原料工厂 
public abstract class AbsRawMaterialFactoryBase
{
    public abstract void SetRawMaterial(Snack snack);
}

// 土豆
public class PotatoFactory : AbsRawMaterialFactoryBase
{
    public override void SetRawMaterial(Snack snack)
    {
        snack.AddDescription("土豆原料");
    }
}

// 小麦
public class WheatFactory : AbsRawMaterialFactoryBase
{
    public override void SetRawMaterial(Snack snack)
    {
        snack.AddDescription("小麦原料");
    }
}
